package com.xinqi.modules.sys.log.controller.inner;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.sys.log.service.AsyncLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @version V1.0
 * @Title: 用户操作日志
 * @ClassName: com.xinqi.modules.sys.log.controller.inner.AsyncLogInnerController.java
 * @Description:
 * @Copyright 星齐科技（云南）有限公司 - Powered By 技术部
 * @author: yyzhen
 * @date: 2023/8/25 10:51
 */
@RestController
@RequestMapping("/inner/async-log")
@RequiredArgsConstructor
public class AsyncLogInnerController {

    private final AsyncLogService asyncLogService;

    /**
     * 异步日志保存
     *
     * @param map
     * @return
     */
    @PostMapping(value = "/saveAsyncLog")
    public R<Long> saveAsyncLog(@RequestBody Map<String, Object> map) {
        return R.ok("操作成功", asyncLogService.saveAsyncLog(map));
    }

}
